﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;

namespace Performance
{
    public partial class PerformanceWindow : Form
    {
        public PerformanceWindow()
        {
            InitializeComponent();
        }

        public Chart getChart()
        {
            return this.chart1;
        }
        public ComboBox getComboBox()
        {
            return this.comboBox1;
        }

        public void setLabel(string label, double value)
        {
            Control[] c = this.oneNrMeasuresBox.Controls.Find("val_" + label, false);
            Label lbl   = (Label)c[0];
            value       = System.Math.Round(value * 100) / 100;
            lbl.Text    = value.ToString();
        }

        private void fileSelectClick(object sender, EventArgs e)
        {
            this.fileDialog.Filter = "CSV|*.csv";
            this.fileDialog.ShowDialog();
        }

        private void fileSelected(object sender, CancelEventArgs e)
        {
            this.lbl_distFile.Text = this.fileDialog.FileName;
            Program.fileSelected(sender, e);
        }
    }
}
